#!/usr/bin/env python

import wx
import component as c
import resource.string.menu.main as rMain
import resource.string.menu.doc as rDoc
import resource.string.menu.file as rFile
import resource.string.menu.help as rHelp
import resource.toolbar as rTool

class ToolBar(wx.ToolBar):
    '''ToolBar class
    
    @author Julot <andy.julot@gmail.com>
    @since Thursday, February 02, 2012. 11:00 PM'''
    
    def __init__(self, parent):
        style = wx.TB_HORIZONTAL | wx.TB_FLAT
        super(ToolBar, self).__init__(parent, style=style)
        self.SetToolBitmapSize((16, 16))
        
        tool = c.ToolBarToolBase
        
        self.browse = tool(self, rTool.FolderOpenImage.Bitmap,
                           rDoc.browse.label, rDoc.browse.help)
        
        self.AddSeparator()
        
        self.update = tool(self, rTool.UploadCloud.Bitmap, rDoc.update.label,
                           rDoc.update.help)
        
        self.AddSeparator()
        
        self.help = tool(self, rTool.QuestionButton.Bitmap, rMain.help.label,
                         rMain.help.help)
        
        self.about = tool(self, rTool.About.Bitmap, rHelp.about.label,
                          rHelp.about.help)
        
        self.AddSeparator()
        
        self.close = tool(self, rTool.DoorOpenOut.Bitmap, rFile.quit.label,
                          rFile.quit.help)
